//
// Created by ziya on 2025/5/21.
//

#ifndef YALANG_LEXER_2_BUFFER_H
#define YALANG_LEXER_2_BUFFER_H

typedef struct {
    char *data;
    int length;
    int capacity;
} buffer;

void buffer_init(buffer *buf);
void buffer_append(buffer *buf, char c);
void buffer_free(buffer *buf);
const char* buffer_cstr(buffer *buf);

#endif //YALANG_LEXER_2_BUFFER_H
